﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>
<%
if sid<>"Null" then
	urls=Request.QueryString("urls")
	if urls="" then urls="fans.asp"
	page=Request.QueryString("page")
	if page="" or page<0 then page=1
	if not isnumeric(page) then page=1
	page=clng(page)
select case v
case "0"
we0="<br/>"
hr="-------------<br/>"
book1="<input name='fansid' format='*N' size='15' maxlength='50'/><br/><anchor>[确认提交]<go href='spacev.Asp?sid="&sidd&"' method='post'><postfield name=""nid"" value=""$(fansid:n)"" /></go></anchor><br/>"
%>
<card title="我的好友"><p align="<%=qingtian.px%>">
<%
case "1"
hr=""
zi="<span style=""color:#FF5500"">"
zi0="</span>"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
we1="</div>"
book1=""&dao&"<form action=""spacev.Asp?sid="&sidd&""" method=""post""><input type=""text"" name=""nid"" value="""" format=""*N"" size=""15"" maxlength=""200""/><br/><input type=""submit"" value=""确认提交""/></form>"&we0&""
%>
<title>我的好友</title>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%

End Select
qingtian.info
%>		
<%=qingtian.qingsav("107")%>
<%=dao%>==我的好友==<%=we0%><%=hr%>
<%
	Set Rs = Server.CreateObject("Adodb.Recordset")
	Sql = "select id,fansid from qingtian_fans where nid=(select top 1 id from qingtian_user where sid='"&qingtian.Formatsid(sid)&"') order by id desc"
	Rs.Open Sql,conn,1,1
	if not (rs.bof and rs.eof)  then
				Rs.PageSize = 6	'一页N条记录
				IF Not IsEmpty(Page) Then
					IF Not IsNumeric(Page) Then		'判断Page是否为数字
						Page=1
					Else
						Page=Cint(Page)		'转换成短整形Integer
					End IF
					IF Page > Rs.PageCount Then
						Rs.AbsolutePage = Rs.PageCount	'设置当前显示页等于最后一页
					ElseIF Page <= 0 Then
						Rs.AbsolutePage = 1		'设置当前页等于第一页
					Else
						Rs.AbsolutePage = Page	'如果大于零,显示当前页等于接收的页数
					End IF
				Else
					Rs.AbsolutePage = 1
				End IF
				Page = Rs.AbsolutePage
		For i=1 to Rs.PageSize
			If Rs.Eof Then
				exit For
			End If
		eid=Request.QueryString("eid")
		vid=Request.QueryString("id")
		if eid="" then eid=0
		if vid="" then vid=0
%>
<%=we%>[<%=qingtian.onlina(rs("fansid"))%>]<a href="spacev.Asp?nid=<%=rs("fansid")%>&amp;sid=<%=sidd%>&amp;urls=<%=urls%>"><%=qingtian.name(rs("fansid"))%>(<%=rs("fansid")%>)</a><%=we0%><%=sou%>[<a href="addinfo.Asp?bid=<%=rs("fansid")%>&amp;id=<%=vid%>&amp;eid=<%=eid%>&amp;sid=<%=sidd%>&amp;urls=<%=urls%>">发内线</a>.<a href="addfans.asp?act=pay1&amp;id=<%=rs("id")%>&amp;sid=<%=sidd%>&amp;urls=<%=urls%>">删除</a>]<%=we0%>
<%
		Rs.MoveNext
		Next
 Response.Write(""&we&"")
%>
<a href="addfans.asp?act=pay2&amp;sid=<%=sidd%>&amp;urls=<%=urls%>">=清空所有好友=</a><%=we0%> 
<%      
   		if rs.PageCount >1 then
     		    Response.Write sou
    		End If
    		If Page < rs.PageCount Then
    		    Response.Write("<a href='fans.asp?page=" & Page + 1 & "&amp;sid="&sidd&"&amp;urls=" & urls & "'>下一页</a>")
    		End If
       
    		If Page > 1 And Page < rs.PageCount Then
    		    Response.Write("|")
    		End If
        
    		If Page > 1 Then
    		    Response.Write("<a href='fans.asp?page=" & Page - 1 & "&amp;sid="&sidd&"&amp;urls=" & urls & "'>上一页</a>"&we0&"")
    		Elseif rs.PageCount >1 then
    		    Response.Write(""&we0&"")
    		End If
   		if rs.PageCount >1 then
     		    Response.Write(""&we&"(第" & Page & "/总" & rs.PageCount & "页/" & rs.RecordCount & "条)"&we0&"")
    		End If
	else
		%><%=we%>你还没有添加任何好友<%=we0%><%
	end if
	Rs.close
	set rs=nothing
		%>
<%=sou%>+输入会员ID查找<%=we0%>
<%=book1%>
<%=hr%>
<%=qingtian.qingsav("108")%><%=sou%><a href="index.asp?sid=<%=sidd%>">我的地盘</a>|<a href="shangchen.asp?sid=<%=sidd%>">商场</a>|<a href="chuwu.asp?sid=<%=sidd%>">储物箱</a><%=we0%>                  <%

else
Response.Redirect "/login.asp?sid=" & sidd & "&url=/user/fans.asp?sid="&sidd&"@@urls="&urls

end if

end Function
%>
